function selectAll(){
	var ckb = document.getElementsByName("ckb");
	if(ckb.length > 0){
		if(document.getElementById("checkAll").checked == true){
			for(var i=0;i<ckb.length;i++){
				ckb[i].checked = true;
			}
		}
		else if(document.getElementById("checkAll").checked == false){
			for(var i=0;i<ckb.length;i++){
				ckb[i].checked = false;
			}
		}
	}
}



function searchCustomerInfo(){
	var key = document.getElementById("key").value;
	if(key == ""){
		alert("关键字不能为空");
		return false;
	}
	else{
		window.location.href = "../servlet/ManageCustomerInfo?method=search&key="+key+"";
		return true;
	}
}

function coolCustomerInfoOfSearching(customerId,isCooled,key){
	if(isCooled == "0"){
		if(confirm("您确定要冻结当前所选患者?")){
			window.location.href = "../servlet/ManageCustomerInfo?method=cool&customerId="+customerId+"&isCooled="+isCooled+"&isSearching=yes&key="+key+"";
		}
	}
	else{
		if(confirm("您确定要激活当前所选患者?")){
			window.location.href = "../servlet/ManageCustomerInfo?method=cool&customerId="+customerId+"&isCooled="+isCooled+"&isSearching=yes&key="+key+"";
		}
	}
}
//冻结、激活点击事件
function coolCustomerInfo(customerId,isCooled){
	if(isCooled == "0"){
		if(confirm("您确定要冻结当前所选患者?")){
			window.location.href = "../servlet/ManageCustomerInfo?method=cool&customerId="+customerId+"&isCooled="+isCooled+"";
		}
	}
	else{
		if(confirm("您确定要激活当前所选患者?")){
			window.location.href = "../servlet/ManageCustomerInfo?method=cool&customerId="+customerId+"&isCooled="+isCooled+"";
		}
	}
}




function back(){

	window.location.href = "../servlet/ManageCustomerInfo?method=showManageCustomerInfoPage";
	}
	
	